﻿using Application.AppService.ERAppService;
using Application.AppService.HFAppService;
using Application.AppService.JurisdictionAppService;
using Application.AppService.SGAppService;
using Application.AppService.SGDAppService;
using AutoMapper;
using Domain.Entity;
using Microsoft.AspNetCore.Mvc;

namespace UI.Controllers
{
    public class MenuController : Controller
    {

        private readonly IJurisdictionAppService jurisdictionAppService;
      

        public MenuController(IJurisdictionAppService jurisdictionAppService)
        {
           this.jurisdictionAppService = jurisdictionAppService;
        }
        public IActionResult Index()
        {
            return View();
        }
        [HttpPost("GetMenu/{LuJing}")]
        public IActionResult GetMenu(string LuJing)
        {
            string viewName = LuJing;
            ViewBag.ViewName = viewName;
            return View();
        }
        [HttpPost("GetMenu1")]
        public IActionResult GetMenu1(int rid)
        {
            List<Quan> quans = jurisdictionAppService.GetPermissionObjectPID(rid); 
            return Json(quans);
        }
    }
}